<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>V-ON  事件响应</title>
    <script src="vue2610.js"></script>
</head>
<body>
<div id="app">
    <div>{{name}}</div>
    <button v-on:click="myopic">change name</button>
    <hr>
    <button v-on:click="submit">提交</button>
    <hr>
    <button @click="acyclic">@click</button>
</div>

</body>

<script>
    new Vue({
        el:'#app',
        data:{
        name:'alex'
        },
        methods:{
            // ES6 ,属性函数时,可以省略:分隔以及函数function 关键字!!!!
            myopic () {
                this.name = "job"
            },
            submit:function () {
                console.log("submit click")
                this.name = "submit"
            },
            acyclic:function () {
                this.name = "@click"
            }

        }
    });
</script>
</html>